Request Pdf Document Password Callback
The callback is invoked when the frame requests the password for an encrypted PDF document.
Use the password to provide the password for the encrypted PDF document.
Use the showPasswordDialog method to invoke the default PDF viewer password dialog.
Use the cancel method to cancel the request.
browser.set(RequestPdfDocumentPasswordCallback.class, (params, tell) -> {
if (params.url().endsWith("my-protected-file.pdf")) {
tell.password("H3NXrfF23");
}
});
Content copied to clipboard
Since
7.27